<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 编写一个函数，计算三个数字的大小，按从小到大顺序输出 -->
    <script>
        window.onload = function () {
            let num = prompt("请输入第一个数:") * 1;
            let num1 = prompt("请输入第二个数:") * 1;
            let num2 = prompt("请输入第三个数:") * 1;
            let max = num;
            let min = num;
            let mid = num;
            let bi = function (num, num1, num2) {
                if (num > num1 ? (num > num2 ? max = num : max = num2) : (num1 > num2 ? max = num1 : max = num2)) {
                    // console.log(max)
                }
                if (num > num1 ? (num1 > num2 ? min = num2 : min = num1) : (num > num2 ? min = num2 : min = num)) {
                    // console.log(min)
                }
                if (num > num1 ? (num1 > num2 ? mid = num1 : mid = num2) : (num > num2 ? mid = num : mid = num2)) {
                    // console.log(min)
                }
                mid = num + num1 + num2 - max - min
                // console.log(num + num1 + num2)
                console.log(min + " " + mid + " " + max)
                // console.log(min + " " + mid + " " + max)
            }
            bi(num, num1, num2)
        }
    </script>
</body>

</html>